public class Test {
    public static void func(int[] array,int index){
        if (array == null){
            throw new NullPointerException();
           // System.out.println("jjj");
        }
        System.out.println("jjj");
        if(index > array.length){
            throw new ArrayIndexOutOfBoundsException();
        }
    }
    public static void main(String[] args) {
        /*int[] arr = null;
        System.out.println(arr.length);*/
        func(null, 1);
    }
    public static void main1(String[] args) {
       /* int i = 10 / 0;
        System.out.println(i);*/
        int[] arr = {1,2,3};
        int[] arr1 = null;
        System.out.println(arr1.length);
    }
}
